import sys, urllib2,os,re

req =  urllib2.Request(sys.argv[1])
fd = urllib2.urlopen(req)

def gettitle(strings):
    first = re.search(r"\.[\w\W]{1,100}\.",strings).group()
    return re.search(r"[^\.]{1,100}",first).group()

while True:
	data = fd.read(1024)
    	if not len (data):
	    break
	sys.stdout.write(data)
	filecwd = os.getcwd() + "/"+gettitle(sys.argv[1])+".html"
	my_html = open(filecwd,"w")
	my_html.write(data)
	my_html.close()
	print "file is in :\n\t\t %s"%os.getcwd()
